<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改密码</title>
    <link rel="shortcut icon" href="../resources/favicon.ico" th:href="@{/static/favicon.ico}"/>
    <!-- favicons Icons -->
    <link rel="apple-touch-icon" sizes="180x180" href="/moban5146/assets/images/favicons/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="/moban5146/assets/images/favicons/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/moban5146/assets/images/favicons/favicon-16x16.png">
    <link rel="manifest" href="/moban5146/assets/images/favicons/site.webmanifest">
    <meta name="description" content="Pylon Loan HTML Template">

    <!-- fonts -->
    <link href="https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
          rel="stylesheet">

    <link rel="stylesheet" href="moban5146/assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="moban5146/assets/css/fontawesome-all.min.css">
    <link rel="stylesheet" href="moban5146/assets/css/swiper.min.css">
    <link rel="stylesheet" href="moban5146/assets/css/animate.min.css">
    <link rel="stylesheet" href="moban5146/assets/css/pylon-icons.css">
    <link rel="stylesheet" href="moban5146/assets/css/odometer.min.css">
    <link rel="stylesheet" href="moban5146/assets/css/magnific-popup.css">
    <link rel="stylesheet" href="moban5146/assets/css/bootstrap-select.min.css">
    <link rel="stylesheet" href="moban5146/assets/css/nouislider.min.css">
    <link rel="stylesheet" href="moban5146/assets/css/nouislider.pips.css">

    <link rel="stylesheet" type="text/css" href="css/layout.css"/>
    <link rel="stylesheet" type="text/css" href="css/hyzx.css"/>

    <!-- template styles -->
    <link rel="stylesheet" href="/moban5146/assets/css/main.css">
</head>
<body>
<div class="preloader">
    <img class="preloader__image" src="/moban5146/assets/images/loader.png" alt="">
</div><!-- /.preloader -->
<div class="page-wrapper">
    <header class="main-header">
        <div class="topbar">
            <div class="container">
                <div class="topbar__left">
                    <div class="topbar__social">
                        <a href="#" class="fab fa-facebook-square"></a>
                        <a href="#" class="fab fa-twitter"></a>
                        <a href="#" class="fab fa-pinterest-p"></a>
                        <a href="#" class="fab fa-instagram"></a>
                    </div><!-- /.topbar__social -->
                    <a href="#">产品中心</a>
                    <a href="#">金小贷</a>
                    <a href="#">申请贷款</a>
                </div><!-- /.topbar__left -->
                <div class="topbar__right">
                    <a href="#"><i class="pylon-icon-email1"></i>needhelp@company.com</a>
                    <div class="dropdown">
                        <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenuDivider"
                                data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                            <span class="caret" th:text="${session.users}"></span>
                        </button>
                        <ul class="dropdown-menu" aria-labelledby="dropdownMenuDivider">
                            <li><a href="personal.html" style="margin-left: 10px; color: black;">个人中心</a></li>
                            <li><a href="#" style="margin-left: 10px; color: black;">消息</a></li>
                            <hr>
                            <li><a href="signOut" style="margin-left: 10px; color: black;">退出登录</a></li>
                        </ul>
                    </div>
                </div><!-- /.topbar__right -->
            </div><!-- /.container -->
        </div><!-- /.topbar -->
        <nav class="main-menu">
            <div class="container">
                <div class="logo-box">
                    <a href="index-2.html" aria-label="logo image"><img
                            src="/moban5146/assets/images/logo-dark.png" width="155" alt=""></a>
                    <span class="fa fa-bars mobile-nav__toggler"></span>
                </div><!-- /.logo-box -->
                <ul class="main-menu__list">
                    <li class="dropdown">
                        <a href="index-2.html">首页</a>
                        <ul>
                            <li>
                                <a href="index.html">企业贷款</a>
                            </li>
                            <li class="dropdown">
                                <a href="#">个人贷款</a>
                                <ul>
                                    <li><a href="index.html">信用贷</a></li>
                                    <li><a href="index-2.html">订单贷</a></li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="about.html">品牌合作</a>
                        <ul>
                            <li><a href="team.html">买好车</a></li>
                            <li><a href="team-details.html">中国银行</a></li>
                        </ul>
                    </li>
                    <li class="dropdown"><a href="services.html">产品中心</a>
                        <ul>
                            <li><a href="how-it-works.html">金小贷</a></li>
                            <li><a href="credit-card-details.html">信用贷</a></li>
                        </ul>
                    </li>
                    <li class="dropdown"><a href="news.html">快捷银行</a>
                        <ul>
                            <li><a href="credit-card">办卡</a></li>
                            <li><a href="news-details.html">转账</a></li>
                        </ul>
                    </li>
                    <li class="dropdown"><a href="test.html">金融资讯</a>
                        <ul>
                            <li><a href="how-it-works.html">How It Works</a></li>
                            <li><a href="loan-calculator.html">Loan Calculator</a></li>
                            <li class="dropdown">
                                <a href="credit-card.html">Credit Card</a>
                                <ul>
                                    <li><a href="credit-card.html">Credit Card</a></li>
                                    <li><a href="credit-card-details.html">Credit Card Details</a></li>
                                </ul>
                            </li>
                            <li><a href="faq.html">FAQ</a></li>
                            <li><a href="testimonials.html">Testimonials</a></li>
                        </ul>
                    </li>
                    <li class="search-btn search-toggler">
                        <a href="#"><i class="pylon-icon-magnifying-glass"></i></a>
                    </li>
                </ul>
                <!-- /.main-menu__list -->

                <div class="main-header__info">
                    <div class="main-header__info-phone">
                        <i class="pylon-icon-tech-support"></i>
                        <div class="main-header__info-phone-content">
                            <span>联系电话</span>
                            <h3><a href="tel:92-666-888-0000">92 666 888 0000</a></h3>
                        </div><!-- /.main-header__info-phone-content -->
                    </div><!-- /.main-header__info-phone -->
                </div><!-- /.main-header__info -->
            </div><!-- /.container -->
        </nav>
        <!-- /.main-menu -->
    </header><!-- /.main-header -->


    <div class="stricky-header stricked-menu main-menu">
        <div class="sticky-header__content"></div><!-- /.sticky-header__content -->
    </div><!-- /.stricky-header -->

    <div id="hy_con">
        <div id="con_lf">
            <h2>账户管理</h2>
            <ul>
                <li class="lf_li1"><a href="lma?loaDown=personal.html">账户信息</a></li>
                <li class="lf_li6"><a href="lma?loaDown=loansLog.html">贷款记录</a></li>
                <li class="lf_li4"><a href="lma?loaDown=sign.html">待签约</a></li>
                <li class="lf_li2"><a href="lma?loaDown=refund.html">待还款</a></li>
                <li class="lf_li3"><a href="lma?loaDown=overdue.html">已逾期</a></li>
                <li class="lf_li5"><a href="lma?loaDown=refundLog.html">还款记录</a></li>
                <li class="lf_li8"><a href="#">修改密码</a></li>
            </ul>
        </div>
        <div id="con_rh">
<!--            <p><img src="imgs/img_2.png"/></p>-->
            <div class="con_rh_con">
                <p class="rh_title">修改密码</p>
                <form method="post" id="pswForm">
                    <div class="form-group">
                        <label for="psw1" class=" col-sm-5">当前密码:</label>
                        <input id="hidPsw" type="hidden" th:value="${editPsw}">
                        <div class="col-sm-3">
                            <input type="password" class="form-control" id="psw1" name="comEmail" placeholder="请输入原密码"
                                   required="">
                            <span id="psw1_help" style="color: red;" class="glyphicon form-control-feedback"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="psw2" class="control-label col-sm-5">新密码:</label>
                        <div class="col-sm-3 has-feedback" >
                            <input type="password" class="form-control" id="psw2" name="comEmail" placeholder="请输入新密码"
                                   required="">
                            <span id="psw2-help" style="color: red;" class="glyphicon form-control-feedback"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="psw3" class="control-label col-sm-5">确认密码:</label>
                        <div class="col-sm-3 has-feedback">
                            <input type="password" class="form-control" id="psw3" name="comEmail" placeholder="请输入再次确认密码"
                                   required="">
                            <span id="psw3-help" style="color: red;" class="glyphicon form-control-feedback"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-4 col-sm-4">
                            <button type="submit" id="psw" class="btn btn-primary" onclick="send()">&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;提&emsp;&emsp;交&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;</button>
                        </div>
                    </div>
                </form>
            </div>
<!--            <p><img src="imgs/img_3.png"/></p>-->
        </div>
    </div>
    <div class="clear"></div>
    <div id="footer">
        <div class="foot_con">
            公司版权所有<br/>
            Copyright 2012 All rights reserved<br/>
            冀ICP备1234567890号
        </div>
    </div>
</div>

<!-- /.search-popup -->
<a href="#" data-target="html" class="scroll-to-target scroll-to-top"><i class="fa fa-angle-up"></i></a>


<script src="moban5146/assets/js/jquery-3.5.1.min.js"></script>
<script src="/moban5146/assets/js/bootstrap.bundle.min.js"></script>
<script src="moban5146/assets/js/swiper.min.js"></script>
<script src="moban5146/assets/js/jquery.ajaxchimp.min.js"></script>
<script src="moban5146/assets/js/jquery.magnific-popup.min.js"></script>
<script src="moban5146/assets/js/jquery.validate.min.js"></script>
<script src="moban5146/assets/js/bootstrap-select.min.js"></script>
<script src="moban5146/assets/js/wow.js"></script>
<script src="moban5146/assets/js/odometer.min.js"></script>
<script src="moban5146/assets/js/jquery.appear.min.js"></script>
<script src="moban5146/assets/js/wNumb.min.js"></script>
<script src="moban5146/assets/js/nouislider.min.js"></script>

<!-- template js -->
<script src="moban5146/assets/js/theme.js"></script>
<script src="/js/jquery.easing.min.js"></script>

<script>
$(function (){
    $("#psw").click(function (){
        var hidPsw = $("#hidPsw").val();
        var psw1 = $("#psw1").val();
        var psw2 = $("#psw2").val();
        var psw3 = $("#psw3").val();
        // alert(hidPsw+psw1+psw2+psw3);
        if (!(hidPsw === psw1)){
            $("#psw1_help").html("原密码输入错误");
            return false;
        }else {
            $("#psw1_help").html("");
            if (!(psw2 === psw3)){
                $("#psw3-help").html("两次密码输入不一致");
                return false;
            }else {
                $("#psw3-help").html("");
                if (psw1 === psw2){
                    $("#psw2-help").html("原密码与新密码相同");
                    return false;
                }else {
                    $("#psw2-help").html("");
                    $.ajax({
                        type: "post",
                        url: "lma/editPsw",
                        data: {psw:psw2},
                        dataType: "json",
                        success: function (){
                            window.location.href = "signOut";
                        }
                    });
                }
            }

        }
    });

})
</script>
</body>
</html>